package com.etc.service.impl;

import com.etc.dao.HistoryOfDao;
import com.etc.service.HistoryOfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HistoryOfServiceImpl implements HistoryOfService {

    @Autowired
    HistoryOfDao dao;

    /**
     * 增加历史记录
     * @param userId
     * @param videoId
     * @return
     */
    @Override
    public boolean addHistory(String userId,int videoId) {
        return dao.insertHistory(userId,videoId)>0;
    }

    /**
     * 删除历史记录
     * @param userId
     * @param videoId
     * @return
     */
    @Override
    public boolean deleteHistory(String userId, int videoId) {
        return dao.deleteHistory(userId,videoId)>0;
    }


}
